Page({
    data: {
        foodname: "今天看什么呢？",
        fooditems: [ "呀,今天没饭吃", "爱情片", "动作片", "搞笑片", "武打片", "特效大片", "恐怖片", "喜剧片", "战争片", "韩国片", "动画片" ],
        animate: !1,
        isclick: !1,
        dateMonth: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ][new Date().getMonth()],
        dateDay: new Date().getDate(),
        dateWeek: [ "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" ][new Date().getDay()]
    },
    onLoad: function(e) {},
    onReady: function() {
        this.getTimeFood();
    },
    getTimeFood: function() {
        var e = this, t = new Date().getHours() + ":" + new Date().getMinutes();
        console.log(t), wx.request({
            url: "https://res.guqule.com/time.json?v=" + new Date().getMinutes(),
            method: "get",
            data: {},
            success: function(a) {
                console.log(a.data), a.data.map(function(a, o) {
                    (e.equalDate(t, a.start_time) || e.compareDate(a.start_time, t)) && e.compareDate(t, a.end_time) && e.setData({
                        foodname: a.text,
                        fooditems: a.menus
                    });
                }), "今天看什么呢？" == e.foodname && (e.foodname = a.data[4].text, e.fooditems = a.data[4].menus);
            }
        });
    },
    compareDate: function(e, t) {
        var a = new Date(), o = e.split(":"), n = t.split(":");
        return a.setHours(o[0], o[1]) < a.setHours(n[0], n[1]);
    },
    equalDate: function(e, t) {
        var a = new Date(), o = e.split(":"), n = t.split(":");
        return a.setHours(o[0], o[1]) == a.setHours(n[0], n[1]);
    },
    rolledUp: function() {
        console.log(this.data.animate), this.data.animate || (this.setData({
            isclick: !0,
            animate: !0
        }), this.bbb(100, 10, 0));
    },
    bbb: function(e, t, a) {
        var o = this;
        o.setData({
            foodname: o.data.fooditems[Math.floor(Math.random() * o.data.fooditems.length)]
        }), o.timer = setInterval(function() {
            o.setData({
                foodname: o.data.fooditems[Math.floor(Math.random() * o.data.fooditems.length)]
            }), clearInterval(o.timer), o.timer = null, t > a ? o.bbb(e, t, a + 1) : o.setData({
                animate: !1
            });
        }, e);
    },
    gotoeleOtherApp1: function() {
        wx.navigateToMiniProgram({
            appId: "wx89752980e795bfde",
            path: "/pages/index/index?pub_id=16479&sid=gongjuxiang&act_id=17&source=jutuike"
        });
    },
    gotoPinOtherApp2: function() {
        wx.navigateToMiniProgram({
            appId: "wxa918198f16869201",
            path: "/pages/web/web?specialUrl=1&src=https%3A%2F%2Fmobile.yangkeduo.com%2Fduo_transfer_channel.html%3FresourceType%3D39997%26pid%3D8516041_57548366%26customParameters%3D16479jutuikegongjuxiang%26authDuoId%3D8516041%26cpsSign%3DCE_220329_8516041_57548366_d686d62399b24dcb3bede50588805a76%26_x_ddjb_act%3D%257B%2522st%2522%253A%25226%2522%257D%26duoduo_type%3D2"
        });
    },
    gotoMeiOtherApp3: function() {
        wx.navigateToMiniProgram({
            appId: "wx165650a77afdc8a5",
            path: "/pages/index/index?promoteId=z0DmLq6m&thirduserid=16479jutuikegongjuxiang&pf=jtk"
        });
    },
    gotomeiOtherApp4: function() {
        wx.navigateToMiniProgram({
            appId: "wxe9714e742209d35f",
            path: "pages/index/index?tra_from=adp%3AC01V4migjprhjl1o%3A%3Amig_code%3A16479jutuikegongjuxiang%3Aac03164migjp0000nw8q1v067e9rc3ff&chl_type=wxk"
        });
    },
    gotomeiOtherApp5: function() {
        wx.navigateToMiniProgram({
            appId: "wxde8ac0a21135c07d",
            path: "/index/pages/h5/h5?lch=mhqIykekFEV63u81zLSTaQViQ&noshare=1&f_userId=0&f_openId=0&f_token=0&weburl=https%3A%2F%2Fdpurl.cn%2FLyixPloz"
        });
    },
    gotomeiOtherApp6: function() {
        wx.navigateToMiniProgram({
            appId: "wxa918198f16869201",
            path: "/pages/web/web?specialUrl=1&src=https%3A%2F%2Fmobile.yangkeduo.com%2Fduo_transfer_channel.html%3FresourceType%3D39996%26pid%3D8516041_141203721%26_pdd_fs%3D1%26_pdd_tc%3Dffffff%26_pdd_sbs%3D1%26customParameters%3D16479jutuikegongjuxiang%26authDuoId%3D8516041%26cpsSign%3DCE_220329_8516041_141203721_d9849a48b00cb46da4a9d9f0b91ccb26%26_x_ddjb_act%3D%257B%2522st%2522%253A%25226%2522%257D%26duoduo_type%3D2"
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});